First, PHP gets the URL of the current page:
Copy the Code code as follows:
Get the current script URLfunction Getcururl (){if (!empty ($_server["Request_uri")){$scriptName = $_server["Request_uri"];$nowurl = $scriptName;}Else{$scriptName =
JS get url parameter modify URL parameter remove URL parameterfunction Urlhelper () {var obj= {}; //gets the value of the URL parameter: name is the name of the parameterObj.getquerystring =function (name) {var reg=NewRegExp ("(^|&)" + name + "= ([^&
PHP get URL parameter method summary, PHP get URL parameter
The example in this article describes how PHP gets URL parameters. Share to everyone for your reference. Specific as follows:
In PHP, there are many ways to get the parameters in the URL,
Using jquery to get URLs and using jquery to get URL parameters is an operation we often use
1, jquery get URL is very simple, the code is as follows
Window.location.href;
Actually just use JavaScript to base the Window object, and
The following code is the PHP resolution URL and gets the parameters in the URL, as shown in the following code:
string ' content ' (length=7) ' C ' => string ' index ' (length=5) ' a ' => string ' lists ' (length=5) ' catid ' => string ' 6 '
Using jquery to get URLs and using jquery to get URL parameters is the operation we often use, the following text description and code analysis of the form for everyone to analyze, please see below for details.
1, jquery get URL is very simple, the
A: JS URL to pass the Chinese parameter garbled problem, Focus: encodeURI encoding, decodeURI decoding:1. Pass the reference pageJavaScript code:2. Receive Parameters page: test02.htmlTwo: How to get the url "? "After," = "parameter value:A. First
No nonsense, directly affixed to the code, through the example of a description of JS according to the key value of the URL to get the parameter value and the URL of the parameters to convert to JSON object, example two to get URL pass parameters,
A: JS URL to pass the Chinese parameter garbled problem, Focus: encodeURI encoding, decodeURI decoding:1. Pass the reference pageJavaScript code: 2. Receive Parameters page: test02.htmlTwo: How to get the url "? "After," = "parameter value:A. First
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.